-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added django>=2.0 compat #551
base: master
Are you sure you want to change the base?
Conversation
setup.py
Outdated
'Framework :: Django :: 1.10', | ||
'Framework :: Django :: 1.11', | ||
'Framework :: Django :: 2.0', | ||
'Framework :: Django :: 2.1', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AGASS007 great!
are you planning to release a new version soon?
TenantModel = get_tenant_model() | ||
all_tenants = TenantModel.objects.all() | ||
values = TenantModel.objects.values_list( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of values_list()
why not use only("schema_name", "domain_url")
? That way you can still keep the (t.schema_name, t.domain_url,) for t in all_tenants])
because the way youre doing it now, the order can be reversed depending on the python version.
ORIGINAL_BACKEND = getattr(settings, 'ORIGINAL_BACKEND', 'django.db.backends.postgresql_psycopg2') | ||
# Django 1.9+ takes care to rename the default backend to 'django.db.backends.postgresql' | ||
original_backend = django.db.utils.load_backend(ORIGINAL_BACKEND) | ||
original_backend = django.db.utils.load_backend('django.db.backends.postgresql') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can cause issues, i can see the need to not break this, i can come up with a couple scenarios on why you would want to override this.
Status? |
No description provided.